﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace anks.Components
{
    public abstract class CustomFactory
    { 
        public abstract Component Create(Component.ComponentParams componentParams);
    }

    public class ComponentFactory<T> : CustomFactory where T : Component, new()
    {
        public override Component Create(Component.ComponentParams componentParams)
        {
            T comp = new T();
            comp.AssignParams(componentParams);
            return comp;
        }
    }
}
